Hook for accessing the storage instance of the Sequence Connect client
Storage<StorageItem> | null
Returns the Storage instance if available, or null if not configured.
Parameter | Type | Description |
---|---|---|
key | keyof StorageItem | The key of the storage item to retrieve |
UseQueryResult<StorageItem[K]>
Returns a react-query result containing the storage item data, with the following properties:
Property | Type | Description |
---|---|---|
data | StorageItem[K] | The retrieved storage item data |
isLoading | boolean | Whether the data is currently loading |
isError | boolean | Whether an error occurred during data fetching |
error | Error | The error object if an error occurred |
… | … | Other react-query properties |
useStorage
hook is commonly used for operations that require direct access to the storage layer, such as generating authentication proofs, while useStorageItem
provides a convenient way to access specific items with react-query integration.